Skip to main content

Full text of "Hacks and Mods"

See other formats


The Mind Surfer 



i 



Make Projects 



build, hack, tweak, share, discover, J 



The Mind Surfer 



Written By: Mark Ulrich 



f TOOLS: 

• Cutting pliers (1) 

just in case the saw gets stuck 

• Keyhole saw (1) 

• Scissors (1) 



© PARTS: 

• Computer (1) 

preferably Windows XP with BlueSoleil 
Bluetooth software 

• Nintendo Wii Remote (1) 
$50 

• Bike helmet (1) 
preferably old 

• String (1) 

• Rubber bands (1) 

• Duct tape (1) 

• Taped) 

/ used shiny aluminum foil tape, but duct 
tape in the color of your choice will work 
just fine. 



SUMMARY 

In recent years, researchers have developed technology that allows people to control 
computers and wheelchairs with their brain waves. My Mind Surfer is a helmet that seems to 
allow its wearer to control a toy vehicle via brain waves, but the technology is based on 



© Make Projects 



www.makeprojects.com 



Page 1 of 1 



The Mind Surfer 

something much simpler than brain waves. It has a Nintendo Wii Remote hidden in it. 

Ask a friend to wear the Mind Surfer and tell him if he wants the cursor (or robot, or game 
character) to move left, he must imagine the left side of his head growing warmer or heavier 
as he "concentrates his brain's electrical energy." Chances are, he'll subconsciously tilt his 
head a couple of degrees to the left. The Wiimote detects the tilt, and your unsuspecting 
victim will be astounded to see that your helmet can "read" his thoughts! 

The Nintendo Wii Remote can sense the magnitude and direction of tilt relative to gravity, 
and convert these into outputs for the device of your choice. You have myriad programming 
options to choose from; I've used GlovePIE and LabVIEW to control a cursor and a Lego 
NXT robot, respectively, but what I've outlined in this article is the simplest option: a 
Windows program called WiinRemote. 

Functional Overview 

The Nintendo Wii Remote provides the Mind Surfer with a nicely bundled 3-axis 
accelerometer and Bluetooth (2.4GHz-band) radio. The accelerometer measures 
acceleration relative to free-fall; an accelerometer falling into a bottomless pit would 
measure Og on each axis. A Wiimote sitting flat, face up on a table, would read 1g force on 
the vertical z-axis and Og on the flat y and x axes, and as you tilted the Wiimote to the right 
the z-axis would decrease and the x-axis would increase. 

If we assume that a person wearing the Mind Surfer is only tilting her head, not changing her 
location, we can use the accelerometer data to determine the tilt of the user's head relative 
to gravity. 

Note: Accelerometers cannot detect yaw (turning/rotating the head left or right), only roll 
(tilting the head right or left, bringing the ear slightly closer to the shoulder) and pitch (tilting 
the head forward or back). 

A computer receives and processes the accelerometer data via Bluetooth and sends outputs 
to the cursor, while a redecorated bicycle helmet provides a good casing to hide the Wiimote 
from inquisitive users and keep it oriented with the user's head. By creating a cradle with a 
cover, you allow the Wiimote to be moved easily in and out of the Mind Surfer when you 
switch back to playing Wii Tennis. 



© Make Projects www.makeprojects.com Page 2 of 1 



The Mind Surfer 




Many different Wiimote hacks are available online. One of the easiest programs to set up 
is Wi in Remote (which outputs to your cursor), as I'll outline here; Mac users can download 
DarwiinRemote. 

More programming expertise is needed to use GlovePIE (which can simulate inputs for a 
variety of games) or LabVIEW (which I used to control a Lego NXT). Links to all of these 
are available in the Resources section, on page 56. 



Programs like WiinRemote are freeware, haven't been fully tested, and may cause 
problems if they aren't fully compatible with your system. 







© Make Projects 



www.makeprojects.com 



Page 3 of 1 



The Mind Surfer 




WiinRcmote - Active 



File Options 
Controller M otion S ervsor 







xebe Y:Red 2: Green 



IB Sensor 






Nunch* 




L 



Nunchuk.OF 
Analog X:0 
Analog ¥:0 
llotion X:0 
(lotion Y:0 
Motion Z : t! 



Enable Cursor 



Cursor enabled 



Battery: 37% 



Preferences 






B 



(• Motion S*«soi 
r IRSwOf 

■"' Nur<r*A Analog Sock 



r Enable Cu^r at $ tatty 

I - Hrwfwe at Stalup 
17 DiawGi&ph 
r Rumble on Edge 



Motion Sensor 
Motion s*ntor threshold 

l~ Invert Nofizortal 

r InvwtVerliaal 

Cusor Speed 



is — ^ 



F«i 



Ska* "■; 



When button pt es*ed 
rf Ww* Cur s« Skiww 
P Mwe Cursa Farter 

tv Re-C*nfe on Cusg, OnAJtf 



ButlonAsiign 
Bullon |Up 



- 



Assign |K*ys 
Keys 



• 



| Pokeys: lie** 



[IF 



Sel 



]kw gen edit B?e WrwD . CtHt£ a; etc. 
Execute 



Se! 



IR Sensor 



I - Use motion sensor when lost IF signal 
Display-Edge adjustment [veitJceTj |S0 ^j 



Nuncbuk 



Anato9 Stick 

Cur sot Speed (Analog! 
I - invert Honzotfai 
F Invert Vertical 



Appfer 



Caned 



• On your Wii Remote, press and hold buttons 1 and 2 to make the Wiimote discoverable. 
(Make sure your Wii system is off so it doesn't automatically connect.) 

• On your computer, search for new Bluetooth devices. The Wiimote will have "Nintendo" in 
its name. 

• Connect to the Wiimote without using a passkey or code, and wait for the drivers to 
automatically install. 

• Launch WiinRemote.exe (Photo 1). If the program isn't updating the Motion Sensor graph 
as you move the Wiimote, then it may not be compatible with your system; try running it 
on a Windows XP machine with the BlueSoleil Bluetooth stack. 

• In WiinRemote, select Options => Preferences (Photo 2). In General preferences, disable 



the Rumble on Edge feature (unless you want your helmet buzzing when the cursor hits 
the edge of the screen). 

In Motion Sensor preferences, set the threshold to so that small motions will register. 
Crank up Fast Cursor Speed all the way to the right so that small tilts make a big 
difference. Finally, check Recalibrate on Cursor On/Off, so that if your volunteer suddenly 
shifts, you can easily calibrate to his new position by first pressing Ctrl-S to stop and then 
Ctrl-S to start again. 



© Make Projects 



www.makeprojects.com 



Page 4 of 1 



The Mind Surfer 







If the bike helmet is old enough, you may be able to easily separate the plastic casing from 
the helmet to make cutting easier. 

WARNING: This hack will instantly render the helmet unsafe for bicycling. 




Cut a rectangular, Wiimote-sized slot centered in the top of the bike helmet using the 
keyhole saw and cutting pliers. You can cut all the way through on the sides, but leave 
some tabs of helmet foam at the front and back to support the Wiimote. 

Now add layers of duct tape to the sides of your cutout to make it a snug fit so the Wiimote 
doesn't jostle around. Tie one or two rubber bands across the top of your cutout using 
string. 

Decorate and disguise the bike helmet by layering the decorative tape around the sides, 
but don't cover up the rectangular cutout yet. 

Optionally, you can embed string under the tape to create a layered, mystery technology 
effect (photo 3). 



© Make Projects 



www.makeprojects.com 



Page 5 of 1 



The Mind Surfer 




To prevent the user's head from touching the Wiimote, layer the inside of the helmet with 
duct tape stretching across the rectangular cutout. 

Add a backing layer of duct tape where the tape faces the Wiimote, putting sticky sides 
together, so that both outer sides — touching the head and touching the Wiimote — are 
smooth. 

Finally, create a top cover for the Wiimote slot out of duct tape (again with the option of 
embedding string), and add a backing layer to all but the outer V2". Leave this V2" perimeter 
sticky to make the cover stick to the helmet. 

Insert the Wiimote, slap on the cover, and you're good to go! 



© Make Projects 



www.makeprojects.com 



Page 6 of 1 



The Mind Surfer 




• Wi in Remote's default settings will make the cursor move toward the bottom of the screen 
if you tilt your head forward, and toward the top of the screen if you tilt your head 
backward. To move the cursor side-to-side, keep in mind that you must tilt, not rotate, 
your head. 

• Minimize the WiinRemote window and demonstrate the Mind Surfer to a friend, challenging 
her to tell you where to move the cursor and proving (by tilting your head imperceptible 
amounts) that you're controlling it with your brain waves alone. 

• Press Ctrl-S once to disable the cursor while you put the helmet on, and again to enable it 
and recalibrate it to your current orientation (when you enable it, your current angle 
becomes the zero point). 

• Then see if your friend's mind is strong enough. Tell her, "Sit in a chair with the helmet on, 
relax, and concentrate. Stay still to minimize vibrations. Imagine one area of your head 
(front, right, left, back) growing warmer and heavier as you concentrate your brain's 
electrical energy. The cursor will move in that direction." 

• About one-third of people will miraculously control the cursor. Another third will need a little 
more encouragement ("Try imagining that your right ear is hurting a lot, that someone is 
tugging on it"), while the last third either will find no correlation between where they want 
the cursor to go and where it does go, or will figure out what's really going on. 



© Make Projects 



www.makeprojects.com 



Page 7 of 1 



The Mind Surfer 




a- arctan 



8 



y 



^ig/ + Sz 2 



/?= arctan — 



8: 



x 



■V gy 2 + gz 2 



a = arctan 



gy 



V gx 2 + gz 2 



/? = arctan 



8x 



igy 2 +gz 2 



a- arctan 



gy 



\ 8x 2 + gz 2 



ji- arctan 



Ex 



V gy 2 + 8z 2 



# If you're interested in creating your 
own program to control the device 
of your choice using LabVIEW or 
GlovePIE, use the textbook formula 
in photo 1 to convert accelerations 
to tilt. 

• a: angle of pitch 

• p: angle of roll 

• g x : acceleration in x-axis 
(oriented left/right) 

• g y : acceleration in y-axis 
(oriented back/front) 

• g z : acceleration in z-axis 
(oriented up/down) 




a=kg y 

£=kg x 
k\ constant 



a=kg y 

£=kg x 
k\ constant 



«=kg y 

fi = kg x 

k: constant 



However, in our case the tilt of the 
Wiimote won't vary more than 10°, 
so the following formulas can be 
used to find the direction of tilt. 

• a = kg y 

• (3 = kg x 

• k: constant 

To control a simple 2-wheeled 
robot, you would send: 

• left motor = a + p 

• right motor = a - p 



© Make Projects 



www.makeprojects.com 



Page 8 of 1 



The Mind Surfer 




• If someone wearing the helmet tilts his head forward 1 ° then the robot will move forward at 
(depending on k) 10% power. If he tilts forward 2° and left 1 ° then the robot's left motor 
moves forward at 10% and right motor at 30%, so the robot moves in an arc to the left. 

• If you want a real challenge, figure out how to receive gyroscope data from the Wii 
MotionPlus controller extension for a more accurate, less bumpy Mind Surfer. 

• The design of the Mind Surfer revolved around my notions about how humans interact with 
machines, but it also led me to a deeper appreciation of the union between mind and body. 

Resources 

Here are several programs you can use to receive data from a Wii Remote: 

Wi in Remote 

http://onakasuita.org/wii/index-e.html 

One of the easiest programs to set up for Windows, WiinRemote automatically outputs to your 
cursor, but it can't be easily customized to respond to very small tilts. 

Darwi in Remote 

http://sourceforge.net/projects/darwiin-. .. 

Like a WiinRemote for Macs, it automatically outputs to your cursor. 

LabVIEW interface to Wii Remote 

http://decibel .ni.com/content/docs/DOC- 1 . . . 

The program I originally used for the Mind Surfer, LabVIEW, has sample programs available to 
receive data from the Wii and can easily be customized for many applications. 

GlovePIE 

http://glovepie.org/glovepie.php 

A popular program featuring both a GUI and a code interface that can receive inputs from 
various controllers, including the Wii Remote, and output them as mouse, keyboard, or joystick 

© Make Projects www.makeprojects.com Page 9 of 1 



The Mind Surfer 



controls. 



This project first appeared in MAKE Volume 22 , page 52. 



This document was last generated on 201 2-1 1-011 2:45:26 AM. 



© Make Projects www.makeprojects.com Page 1 of 1